package router

import (
	"github.com/gin-gonic/gin"
	"weekly-exam-1/config"
	"weekly-exam-1/internal/api/goods"
	"weekly-exam-1/tools"
)

func GoodsRouter(router *gin.RouterGroup) {
	good := router.Group("goods").Use(tools.JWTAuth(config.AppConfig.Jwt.Key))
	{
		good.POST("add", goods.GOOdAdd)
		good.POST("list", goods.GoodList)
		good.POST("buy", goods.GoodBuy)
	}
}
